<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="author" content="wangbo" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<script>
      // 箭头函数
			let fn3 = () => {
				//双层循环 层数5
				// 列数
				let row = ''
				for (let i = 1; i <= 5; i++) {
					// 打印空格,将* 挤过去
					for (let j = 5 - i; j >= 0; j--) {
						row = row + ' '
					}
					// 打印*
					for (let k = 1; k <= 2 * i - 1; k++) {
						row = row + '*'
					}
					row += '\n'
				}
				console.log(row)
			}
      fn3();
		</script>
	</body>
</html>
